const http = uni.$u.http;

// /巡检列表
export function getMyTaskList(query) {
	return http.request({
		url: '/iot/inspection/myTaskList',
		method: 'get',
		data: query
	})
}

// /巡检详情
export function getMyTaskRecordList(query) {
	return http.request({
		url: '/iot/record/myTaskRecordList',
		method: 'get',
		data: query
	})
}
// /巡检情况保存
export function postRecord(data) {
	return http.request({
		url: '/iot/record',
		method: 'post',
		data: data
	})
}

// /巡检情况修改
export function putRecord(data) {
	return http.request({
		url: '/iot/record',
		method: 'put',
		data: data
	})
}

// /巡检详情
export function getEtInfo(id) {
	return http.request({
		url: '/iot/setting/' + id,
		method: 'get',
	})
}

// /巡检详情
export function getGetInfo(id, ids) {
	return http.request({
		url: '/iot/record/getInfo/' + id + '/' + ids,
		method: 'get',
	})
}

// 隐患列表
export function getPitfallListTable(query) {
	return http.request({
		url: '/iot/record/pitfallListTable',
		method: 'get',
		data: query
	})
}
// / 隐患详情
export function getRecordId(id) {
	return http.request({
		url: '/iot/record/' + id,
		method: 'get',
	})
}

export function getInspectionId(id) {
	return http.request({
		url: `/iot/inspection/${id}`,
		method: 'get',
	})
}

export function myTaskRecordByMonth(query) {
	return http.request({
		url: `/iot/record/myTaskRecordByMonth`,
		method: 'get',
		data: query
	})
}